package com.keqiongzc.myapplication

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.widget.TextView

class MainActivity : AppCompatActivity() {


    private lateinit var plateView: PlateView

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        plateView = findViewById<PlateView>(R.id.plateView)
        val tv_get_plateView = findViewById<TextView>(R.id.tv_get_plateView)
        val tv_show_plateView = findViewById<TextView>(R.id.tv_show_plateView)
        plateView.setPlate("")
//        plateView.setPlate("京A99999")
//        plateView.setPlate("豫A393HKR")
        tv_get_plateView.setOnClickListener {

            tv_show_plateView.setText(plateView.getPlate())
        }


    }


}